package com.solrtest.doman;

import lombok.Data;
import org.apache.solr.client.solrj.beans.Field;

/**
 * 门店信息
 */
@Data
public class Shop {

    @Field()
    private String id;

    @Field("shop_name")
    private String shopName;

    @Field
    private String address;

    @Field
    private String lng; //经度

    @Field
    private String lat; //纬度

    @Field
    private String position; // 经度 + 维度

    @Field
    private float distance;//距离(用于查询计算后返回时使用)

    public Shop() {
    }

    public Shop(Integer id, String shopName, String address, String lng, String lat) {
        this.id = id + "";
        this.shopName = shopName;
        this.address = address;
        this.lng = lng;
        this.lat = lat;
        this.position = lat + "," + lng;
    }
}
